package com.blueberry.system.controller;

import com.blueberry.system.entity.SysDept;
import com.blueberry.system.service.ISysDeptService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/api/v1/sys/dept")
public class SysDeptController {

    private final ISysDeptService sysDeptService;

    @GetMapping("/test")
    public ResponseEntity<List<SysDept>> test() {
        sysDeptService.list();
        return ResponseEntity.ok(sysDeptService.list());
    }
}
